package com.ljh.webtask5.mybatisplus.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ljh.webtask5.mybatisplus.entity.Book;

/**
 * @author laijiahong
 */
public interface BookMapper extends BaseMapper<Book> {
}

/*
public interface BookMapper {

    @Select("select * from bookList")
    List<Book> selectAll();

    @Select("select * from bookList where index = #{index}")
    Book selectById(int index);

    @Insert("insert into bookList(name, author, press, publicDate, surplus) " +
            "values (#{name}, #{author}, #{press}, #{publicDate}, #{surplus})")
    @Options(useGeneratedKeys = true, keyProperty = "index")
    void insert(Book book);

    @Delete("delete from bookList where index = #{index}")
    void deleteById(int index);

    @Update("update bookList set (name, author, press, publicDate, surplus) =" +
            "(#{name}, #{author}, #{press}, #{publicDate}, #{surplus})" +
            "where index = #{index}")
    void update(Book book);
}*/
